#include <stdio.h>

int main()
{
	//计算机中二进制存储都是补码
	//char = 8字节；short = 2 / 4字节；int = 32 / 64字节
	char a = 3;
	//a的二进制：00000011
	char b = 127;
	//b的二进制：01111111
	char c = a + b;
	//求表达式长度会先转换为int型32字节
	//a + b = 00000000000000000000000000000011 + 
	//        00000000000000000000000001111111
	//      = 00000000000000000000000010000010
	//c的二进制：100000010
	printf("%d\n", c);//结果为-126
	//以整型的形式输出，也会整型提升
	// char c = 00000000000000000000000010000010
	//  int c = 11111111111111111111111110000010(补码)
	//  int c = 11111111111111111111111110000001(反码)
	//  int c = 10000000000000000000000001111101(源码) = -126
	return 0;
}